package com.csgsystems.im.module.action.example;

//import com.csgsystems.im.survey.Category;
import com.csgsystems.im.survey.Survey;
import com.csgsystems.im.survey.SurveyStatus;
//import com.csgsystems.im.survey.SurveyType;

public class AddAction extends ExampleBaseAction {

	/**
	 *
	 */
	private static final long serialVersionUID = -3546543421890987045L;

	
	@SuppressWarnings("unchecked")
	@Override
	public String execute() throws Exception {
		String returnValue = ERROR;
		
		try {
			surveyDao.create(new Survey(name, category, 847, vxml,
					numberOfQuestions, voiceRecording, type, resultFollowup,
					displayResultAverage, SurveyStatus.Inactive));

			returnValue = SUCCESS;
			
		} catch (Exception e ) {
			addActionError(e.getMessage());
			
		}
		return returnValue;

	}
	
}
